#pragma once
#include "hash_table.h"

namespace JRG {
	template<class K,class Hash = HashFun<K>>
	class unorder_set
	{
		struct SetOfT {
			size_t operator()(const K& key)
			{
				return key;
			}
		};
	public:
		typedef typename HashTable<K, K, SetOfT, Hash>::const_iterator iterator;

		iterator begin() const
		{
			return ht.begin();
		}
		iterator end() const
		{
			return ht.end();
		}
		pair<iterator, bool>  insert(const K& key)
		{
			return ht.Insert(key);
		}
		bool Erase(const K& key)
		{
			return ht.Erase(key);
		}
	private:
		HashTable<K,K, SetOfT,Hash> ht;
	};
}
